<template>
  <div class="mod-config">
    <table-view ref="view"
                :searchAttrs="searchAttrs"
                :primaryKey="primaryKey"
                :listApiName="listApiName"
                :deleteApiName="deleteApiName"
                :exportApiName="exportApiName"
                :saveAuthName="saveAuthName"
                :deleteAuthName="deleteAuthName"
                :showAttrs="showAttrs"
    >
    </table-view>
    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
  </div>
</template>


<script>
  import tableView from '@/components/tableView'
  import basicMixins from '@/utils/commonViewMixins'
  import AddOrUpdate from './driverinfo-add-or-update'

  export default {
    mixins: [basicMixins],
    data() {
      return {
        primaryKey: 'id',
        listApiName: 'driverApi/listDriverInfoList',
        deleteApiName: 'driverApi/deleteDriverInfo',
        exportApiName: 'driverApi/getDriverInfoExport',
        saveAuthName: 'driver:driverinfo:save',
        updateAuthName: 'driver:driverinfo:update',
        deleteAuthName: 'driver:driverinfo:delete',
        searchAttrs: {},
        showAttrs: {
          driverName: {
            label: "司机姓名"
          },
          clientName: {
            label: "客户"
          },
          phoneNumber: {
            label: "手机号"
          },
          licensePlateNumber: {
            label: "车牌号"
          },
          remark: {
            label: "备注"
          },
        }
      }
    },
    components: {
      tableView,
      AddOrUpdate
    }
  }
</script>
